home *** CD-ROM | disk | FTP | other *** search
/ Computer Life 1997 February / Computer Life February 1997.iso / TELME / COMMS / ISDN1003.SRP < prev    next >
Text File  |  1996-06-04  |  3KB  |  181 lines

  1. rem Copyright (c) PhoneLink plc 
  2. rem PSL MPC3 - ISDN (10/8/95)
  3.  
  4.  
  5. label InitDevice
  6. echo off
  7. echo script[59]
  8. send    "at&o1s114=115char(13)"
  9. find    "OK"
  10. send    "char(01)$200"
  11. send    "at&O1e0&k1s39=3s112=0&d2char(13)" 
  12. timeout 2,modem_fail
  13. find    "OK"
  14. send "ATOchar(13)"
  15. timeout 5,data_mode_fail
  16. find "*"
  17. send    "set1:1,2:0,3:0,4:20,5:1,12:1,6:5,15:0char(13)"
  18. timeout 5,pad_set_fail
  19. find    "*"
  20. send "char(16)"
  21. timeout 5,ctrl_p_fail
  22. find    "OK"
  23. label OffToGate 
  24. rem ISDN Offline to Gate (also contains Pad to Gate)
  25. echo off
  26. echo script[52]..
  27. send    "atdt{PreTel}{SiteTel}{PostFix}char(13)"
  28. timeout 10,connect_fail
  29. finderr 0,BUSY,busy
  30. finderr 103,NO DIALTONE,connect_fail
  31. finderr 0,NO CARRIER,no_carrier
  32. find    "CONNECT"
  33. timeout 5,pad_fail
  34. find    "*"
  35. label PadToGate
  36. echo off
  37. echo script[53] 
  38. send    "{NUA}char(13)"
  39. timeout 3,nua_bad1
  40. finderr 0,COM,nua_good
  41. find    "ZZZ"
  42. label nua_bad1
  43. echo script[58]
  44. send    "{NUA}char(13)"
  45. timeout 3,nua_bad2
  46. finderr 0,COM,nua_good
  47. find    "ZZZ"
  48. label nua_bad2
  49. echo script[58]
  50. send    "{NUA}char(13)"
  51. timeout 3,nua_fail
  52. finderr 0,CLR DTE,dte_cleared
  53. finderr 0,CLR DER,der_cleared
  54. finderr 0,RESET,reset
  55. finderr 0,CLR OCC,occ_cleared
  56. find    "COM"
  57. label nua_good
  58. echo script[54].
  59. end
  60.  
  61. label GateToPad
  62. echo off
  63. echo script[92]
  64. send    "char(16)"
  65. timeout 10,ctrl_p_fail
  66. find    "*"
  67. mwait 500
  68. send "CLRchar(13)"
  69. timeout 10,clear_fail
  70. find "CLR CONF"
  71. echo script[91].
  72. end
  73.  
  74. label GateToOff
  75. rem Gate to Offline (also contains Pad to Offline)
  76. echo off
  77. echo script[92]
  78. send    "char(16)"
  79. timeout 10,ctrl_p_fail
  80. find    "*"
  81. mwait 500
  82. send "CLRchar(13)"
  83. timeout 10,clear_fail
  84. find "CLR CONF"
  85. label PadToOff
  86. echo off 
  87. echo script[92]
  88. send    "char(16)"
  89. timeout 5,command_mode_fail
  90. find    "OK"
  91. send    "athchar(13)"
  92. timeout 5,hang_up_fail
  93. find    "OK"
  94. echo script[99].
  95. end
  96.  
  97. label modem_offline
  98. echo script[92]
  99. send "char(16)"
  100. timeout 5,clear
  101. find "*"
  102. mwait 500
  103. label clear
  104. send    "CLRchar(13)"
  105. timeout 5,command_mode
  106. find    "CLR CONF"
  107. label command_mode
  108. send    "char(16)"
  109. timeout 5,hang_up
  110. find    "OK"
  111. label hang_up
  112. send    "athchar(13)"
  113. timeout 5,hang_fail
  114. find    "OK"
  115. label hang_fail
  116. abort
  117.  
  118. label modem_fail
  119. echo script[23]
  120. abort
  121.  
  122. label data_mode_fail
  123. echo script[16]
  124. abort
  125.  
  126. label connect_fail
  127. echo script[1]
  128. goto hang_up
  129.  
  130. label busy
  131. echo script[2]
  132. goto hang_up
  133.  
  134. label no_carrier
  135. echo script[3]
  136. goto hang_up
  137.  
  138. label pad_fail
  139. echo script[4]
  140. goto command_mode
  141.  
  142. label pad_set_fail
  143. echo script[5]
  144. goto command_mode
  145.  
  146. label nua_fail
  147. echo script[22]
  148. goto command_mode
  149.  
  150. label dte_cleared
  151. echo script[6]
  152. goto command_mode
  153.  
  154. label der_cleared
  155. echo script[7]
  156. goto command_mode
  157.  
  158. label reset
  159. echo script[8]
  160. goto command_mode
  161.  
  162. label occ_cleared
  163. echo script[9]
  164. goto command_mode
  165.  
  166. label ctrl_p_fail
  167. echo script[12]
  168. goto modem_offline
  169.  
  170. label clear_fail
  171. echo script[13]
  172. goto clear
  173.  
  174. label command_mode_fail
  175. echo script[15]
  176. goto command_mode
  177.  
  178. label hang_up_fail
  179. echo script[17]
  180. abort
  181.